<template>
  <div id="CheckTop">
    <x-header slot="header" style="width:100%;position:absolute;left:0;top:0;z-index:100;"
              :left-options="{showBack: false, backText: '',preventGoBack:false}"
              @on-click-more="showMenus = true"
              @on-click-back="backFun">{{title}}
            <div slot="left">
              <router-link to="/user/index">
                <icon name="user-o" scale="1.5" style="color: #ffffff;margin-top: -3px;"></icon>
              </router-link>
            </div>
          <div slot="right">
            <router-link to="/code">
              <icon name="list" scale="1.5" style="color: #ffffff;margin-top: -2px"></icon>
            </router-link>
          </div>
    </x-header>
  </div>
</template>

<script>
  import {mapState} from 'vuex'
  import {XHeader, TransferDom, cookie} from 'vux'

  export default {
    directives: {
      TransferDom
    },
    components: {
      XHeader
    },
    computed: {
      ...mapState({
        title: state => state.vux.title,
      })
    },
    data () {
      return {
      }
    },
    created(){

    },
    mounted(){
    },
    methods: {
      backFun() {
        if (this.preventGoBack) {
          // this.$router.push({path: this.urlBack});
          window.location.href = this.urlBack;
        }
      },
      numFun(){
      }
    }
  }
</script>
<style lang="less">
  @hui:#555555;
  @blue:#1babe3;
  #CheckTop .vux-header{
    background-color: @hui !important;
    .vux-header-title{
      color:#fff !important;
    }
    .vux-header-right a{
      color: #ffffff !important;
    }

  }
</style>
